@layout("/common/_container.html"){
<script type="text/javascript">
	var ctx="${ctxPath}";
	var grid_selector = "#grid-table";
	var pager_selector = "#grid-pager";
	
	$(function(){
		initGrid();
		initMenuBtn("btns","${code}");
	});
	
	function initGrid(){
		var grid_url = ctx+"/${code}/list/";//查询列表接口
		var _colnames=[ "序列","日志名称", "方法参数","操作人","操作时间","是否成功"];
		var _colmodel=[   {name:"ID",index:"ID", width:80,hidden:true},
						  {name:"LOGNAME",index:"LOGNAME", width:120},
						  {name:"METHOD",index:"METHOD", width:400},
						  {name:"USERNAME",index:"USERID", width:60},
						  {name:"CREATETIME",index:"CREATETIME", width:120,align:"center"},
						  {name:"SUCCEEDNAME",index:"SUCCEED", width:50,align:"center"}
						];
		
		jQuery(grid_selector).jqGrid({
			url:grid_url,
		    shrinkToFit:true,//适用于较少字段,响应式
			colNames:_colnames,
			colModel:_colmodel, 
			jsonReader:{id:"ID"},
			pager : pager_selector,
			postData: {sort: "id", order: "desc"}
		});
		

	}
	
</script>


	<!-- 配置grid -->
	<div class="row">
		<div class="col-xs-12 tb-grid">
			<!-- 配置查询 -->
			@ var _col=[
			@			  {name:"日志名称",index:"LOGNAME", type:"text"},
			@		      {name:"接口地址",index:"METHOD",type:"text"},
			@			  {name:"操作人",index:"USERID", type:"selectUser"}
			@		   ];
			@ include("/common/_function/_search.html",{"col":_col}){}
			<!-- 按钮组 -->
			<div class="welljq well-sm" id="btns"></div>
			<!-- grid -->
			<table id="grid-table"></table>
			<!-- 分页 -->
			<div id="grid-pager"></div>
		</div>
	</div>
	
	<!-- 引入列表页所需js -->
	@include("/common/_listscript.html"){}
@}	